package com.app.twth.ui.login;

import com.app.twth.net.HttpBean;

import java.util.ArrayList;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Data
public class UserEntity extends HttpBean {

    private String username;
    private String token;
    private Integer level;
    private ArrayList<WarehouseListDTO> warehouseList;
    private List<RoleListDTO> roleList;

    @NoArgsConstructor
    @Data
    public static class WarehouseListDTO {
        private int id;
        private String code;
        private int bind;

        @Override
        public String toString() {
            return code + "";
        }
    }

    @NoArgsConstructor
    @Data
    public static class RoleListDTO {
        private int id;
        private String name;
        private int bind;
    }
}
